import Mock from 'mockjs'
const list = Mock.mock({
  'list|10': [
    {
      objectAgreementId: '@id',
      objectName: '@csentence',
      objectAgreementNo: '@integer',
      objectId: '@string',
      agreementContent: '<p>11111</p>',
      'objectType|1': [1, 2],
      signTime: '@datetime'
    }
  ]
})
const dictMap = {
  objectType: {
    1: '222',
    2: '333'
  }
}
const pub = {
  isMore: 0,
  pageIndex: 1,
  pageSize: 10,
  startIndex: 0,
  totalNum: 1,
  totalPage: 1
}
export default [
  // 协议设置
  // 业务协议列表
  {
    url: '/general/objAgreement/listObjectAgreement',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {
          ...list,
          ...pub
        },
        dictMap,
        msg: ''
      }
    }
  },
  // 根据ID查询协议参数
  {
    url: '/general/objAgreement/listObjectAgreementParamById',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {
          ...list.list[0]
        },
        dictMap,
        msg: ''
      }
    }
  }
]
